//
// Tables
//

//
// used in the admin tools => DB check
//

.t3-overview-list dt {
	padding: 0 0 2px 20px;

	img {
		vertical-align: middle;
		margin-right: 5px;
	}
}

.t3-overview-list dd {
	margin: 2px 0 15px 20px;
	padding-left: 22px;
}

//
// Common style for tables
//
// <table class="table table-striped table-hover>
//   <thead>
//     <tr>
//       <th>...</th>
//       <th>...</th>
//     </tr>
//   </thead>
//   <tbody>
//     <tr>
//       <td>
//         <span class="t3-icon t3-icon-treeline t3-icon-treeline-join t3-icon-join">&nbsp;</span>
//       </td>
//       <td>...</td>
//     </tr>
//   </tbody>
// </table>
//

// Revert Bootstrap @table-bg in order to allow ExtJS and dataTable <table>
table {
	background: transparent;
}

//
// Default table styling
//
.table {
	background-color: @table-bg;
	border: 1px solid @table-border-color;
	* {
		box-sizing: border-box;
	}
	> thead,
	> tbody,
	> tfoot {
		> tr {
			> th {
				white-space: nowrap;
				vertical-align: middle;
			}
			> td {
				vertical-align: middle;
			}
		}
	}
	> thead > tr {
		background-color: darken(@table-bg, 5%);
		th,
		td {
			border-bottom: 1px solid @table-border-color;
			i {
				font-weight: normal;
			}
		}
	}
	.btn-group {
		> .btn-group,
		> .btn {
			float: none;
		}
	}
	.btn-default {
		.button-variant(@btn-default-color; darken(@table-bg-accent, 10%); darken(@table-bg-accent, 20%));
	}
	.pagination {
		margin: 0;
	}
	.col-icon {
		text-align: center;
		.t3-icon {
			margin: 0;
		}
		img {
			margin: 0;
			display: block;
			height: 16px;
			width: 16px;
		}
	}
	.col-icon,
	.col-checkbox {
		padding-right: 0;
	}
	.col-title {
		width: 99%;
	}
	.col-nowrap,
	.col-control,
	.col-clipboard {
		white-space: nowrap;
	}
	.col-control,
	.col-clipboard {
		text-align: right;
	}
	.col-control {
		padding: 4px 6px;
	}
	.col-border-left {
		border-left: 1px solid @table-border-color;
	}
	.col-min {
		min-width: 150px;
	}
}

//
// Sets the background to white
//
.table-white {
	background-color: #fff;
}


//
// Sets the background to transparent
//
.table-transparent {
	background-color: transparent;
}

//
// Centers the text in all cells of the table
//
.table-center {
	th,
	td {
		text-align: center
	}
}

//
// Sets a rudimentary table styling
//
.table-basic {
	width: 100%;
	th,
	td {
		vertical-align: middle;
	}
}

//
// Table cell vertical alignment
//
.table-vertical-top {
	> thead,
	> tbody,
	> tfoot {
		> tr {
			> th,
			> td {
				vertical-align: top;
			}
		}
	}
}
.table-vertical-bottom {
	> thead,
	> tbody,
	> tfoot {
		> tr {
			> th,
			> td {
				vertical-align: bottom;
			}
		}
	}
}
.table-no-borders {
	border: none;
	> thead,
	> tbody,
	> tfoot {
		> tr {
			> th,
			> td {
				border: none;
				padding: 2px;
			}
		}
	}
}
//
// Fits the table in the viewport and makes overflow possible
//
.table-fit {
	width: 100%;
	margin-bottom: 1.5em;
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
	-ms-overflow-style: -ms-autohiding-scrollbar;
	border: 1px solid #ddd;

	> .table {
		margin-top: 0;
		margin-bottom: 0;
		border: 0;
		colgroup:first-child + tbody,
		tbody:first-child {
			tr:first-child {
				th,
				td {
					border-top: 0;
				}
			}
		}
		tr {
			> th,
			> td {
				white-space: nowrap;
			}
			> th:first-child,
			> td:first-child {
				border-left: 0;
			}
			> th:last-child,
			> td:last-child {
				border-right: 0;
			}
			&:last-child {
				th,
				td {
					border-bottom: 0;
				}
			}
		}
	}
}
.table-fit-wrap {
	> .table {
		tr {
			> th,
			> td {
				white-space: normal;
			}
		}
	}
}
.table-fit-inline-block {
	max-width: 100%;
	width: auto;
	display: inline-block;
	margin: 0;
	> .table {
		width: auto;
	}
}
.table-fit-block {
	max-width: 100%;
	width: auto;
	display: block;
	margin: 0;
	> .table {
		width: auto;
	}
}
.table-spacer-wrap {
	margin-top: 10px;
	margin-bottom: 10px;
}
